//
// Created by denglibin on 2021/4/10 0010.
//

#ifndef SDL_DEMO_BG_H
#define SDL_DEMO_BG_H
#include "SDL.h"
#include "window.h"
#include "mountain.h"
#include "road_position.h"
/**
 * 背景
 */
typedef struct background{
    int starStartX; //星空绘制起始位置
    int width;//背景总宽度
    SDL_Texture * texture;
    Mountain * mountains[5]; //山
    RoadPosition * roadPositions[5]; //路面

}Background;

/**
 * 创建背景
 * @param imgPath
 * @param winRender
 * @return
 */
Background * BG_createBg(const char* imgPath, GameWindow * gameWindow);


/**
 * 释放资源
 * @param bg
 */
void BG_freeBg(Background* bg);
#endif //SDL_DEMO_BG_H
